package com.qiaoanju.back.domain.system;

import com.qiaoanju.domain.BaseModel;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by eversec on 2017/9/21.
 */
public class MenuModel extends BaseModel {


    private Integer pid;

    private String menu_name ;

    private String menu_url ;

    private Integer menu_type ;

    private Integer menu_level ;

    //角色
    private Integer role_id ;

    //是否可用
    private Integer enable = 1 ;

    public Integer getPid() {
        return pid;
    }

    public void setPid(Integer pid) {
        this.pid = pid;
    }

    public String getMenu_name() {
        return menu_name;
    }

    public void setMenu_name(String menu_name) {
        this.menu_name = menu_name;
    }

    public String getMenu_url() {
        return menu_url;
    }

    public void setMenu_url(String menu_url) {
        this.menu_url = menu_url;
    }

    public Integer getMenu_type() {
        return menu_type;
    }

    public void setMenu_type(Integer menu_type) {
        this.menu_type = menu_type;
    }

    public Integer getMenu_level() {
        return menu_level;
    }

    public void setMenu_level(Integer menu_level) {
        this.menu_level = menu_level;
    }

    public Integer getRole_id() {
        return role_id;
    }

    public void setRole_id(Integer role_id) {
        this.role_id = role_id;
    }

    public Integer getEnable() {
        return enable;
    }

    public void setEnable(Integer enable) {
        this.enable = enable;
    }


    //获取子菜单
    private List<MenuModel> childMenus ;

    public void setChildMenus(List<MenuModel> childMenus) {

        this.childMenus = childMenus ;

    }

    public List<MenuModel> getChildMenus() {

        if (childMenus == null){

            childMenus = new ArrayList<MenuModel>();
        }
        return childMenus;
    }

}
